package 装饰者模式.人穿衣服;

/**
 *
 */
public abstract class Decorator implements People {

    //在父装饰类里定义构造方法，子类通过super调用
    protected People component;

    protected String name;

    public Decorator(String name) {
        this.name = name;
    }

    public Decorator(People component) {
        this.component = component;
    }

    @Override
    public void operator() {
        component.operator();
    }
}
